﻿using Newtonsoft.Json;

namespace ZilLion.Service.WeChatMall.Domain.Entitys
{
    public class FoodEntity
    {
        [JsonProperty("categoryId")]
        public string CategoryId { get; set; }

        [JsonProperty("foodId")]
        public long FoodId { get; set; }

        [JsonProperty("name")]
        public string Name { get; set; }

        [JsonProperty("price")]
        public decimal? Price { get; set; }

        [JsonProperty("oldPrice")]
        public decimal? OldPrice { get; set; }

        [JsonProperty("description")]
        public string Description { get; set; }

        [JsonProperty("sellCount")]
        public decimal? SellCount { get; set; }

        [JsonProperty("rating")]
        public int? Rating { get; set; }

        [JsonProperty("info")]
        public string Info { get; set; }

        [JsonProperty("ratings")]
        public FoodRatingEntity[] FoodRatingsEntity { get; set; }

        [JsonProperty("icon")]
        public string Icon { get; set; }

        [JsonProperty("image")]
        public string Image { get; set; }
    }

    public class FoodRatingEntity
    {
        [JsonProperty("username")]
        public string Username { get; set; }

        [JsonProperty("rateTime")]
        public long? RateTime { get; set; }

        [JsonProperty("rateType")]
        public int? RateType { get; set; }

        [JsonProperty("text")]

        public string Text { get; set; }

        [JsonProperty("avatar")]
        public string Avatar { get; set; }
    }
}